﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HuntWump2
{
    class Room
    {
        public int roomNumber;
        public List<int> doorDirections;

        public Room(int rmNmbr)
        {
            roomNumber = rmNmbr;
            doorDirections = new List<int>();
        }

        public void addDoor(int i)
        {
            doorDirections.Add(i);
        }

        public List<int> getDoors()
        {
            return doorDirections;
        }

        public int getRoomNumber()
        {
            return roomNumber;
        }

        public int getNumDoors()
        {
            return doorDirections.Count;
        }

        public bool hasDoor(int direction)
        {
            for (int k = 0; k < getNumDoors(); k++)
            {
                if (doorDirections[k] == direction)
                {
                    return true;
                }
            }
            return false;
        }

    }
}
